import request from '@/utils/request'

// 查询在售商品列表
export function listSale(query) {
  return request({
    url: '/jihuo/sale/list',
    method: 'get',
    params: query
  })
}

// 查询在售商品详细
export function getSale(jhId) {
  return request({
    url: '/jihuo/sale/' + jhId,
    method: 'get'
  })
}

// 新增在售商品
export function addSale(data) {
  return request({
    url: '/jihuo/sale',
    method: 'post',
    data: data
  })
}

// 修改在售商品
export function updateSale(data) {
  return request({
    url: '/jihuo/sale',
    method: 'put',
    data: data
  })
}

// 删除在售商品
export function delSale(jhId) {
  return request({
    url: '/jihuo/sale/' + jhId,
    method: 'delete'
  })
}
